1. Field of the Invention
The present invention relates to an image processing method and apparatus for compressing image data.
2. Related Background Art
Hitherto, an image recording apparatus, for example, a thermal printer, an ink jet printer or a laser beam printer, has been used as a terminal in recording systems, that is, white/black printer having a bit map memory. However, the image recording apparatus has been widely used as an apparatus for precisely recording a full color image with recent trends of enlargement of the capacity of the semiconductor memory, development of excellent function LSI and advancement of the computer technology.
On the other hand, there arises a desire of fetching color natural image data into the computer so as to subject it to a variety of processes and perform picture communication. As an encoding method therefor, there has been a variable length encoding method called the "ADCT" (Adaptive Discrete Cosine Transform) method as disclosed in pages 398 to 407, Vol. 18, of the organ of the Picture Electronics Society.
In a case where an image memory arranged to act in accordance with the ADCT method is employed in the image recording apparatus, the memory capacity required to hold a full color natural image can be reduced to 1/10 to 1/20 of the capacity required to hold it as ordinary source data (non-compressed data). Therefore, a satisfactory effect can be obtained because the overall cost of the recording apparatus can be significantly reduced.
On the other hand, in a case where the same is used as a recording apparatus connected to an ordinary computer, it is usually used in such a manner that a standardized PDL (Page Description Language) is employed and data compatibility is established between different recording apparatuses. The reason for the above-described arrangement lies in the use of a common language to establish compatibility in the printers and the computers the specifications of which are different depending upon the manufacturers. As a description language of this type, for example, Post Script.RTM. can be used.
In a case where the above-described PDL is used in a memory, the following problems arises because the PDL has been developed on the basis of a concept of overwriting (that is, arranged to overwrite novel data on the base data written previously):
(1) A block among the 8.times.8 blocks of the ADCT in which an image is synthesized must be updated to novel code data. PA0 (2) Since the variable length encoding method is employed to compress data, address coincidence cannot be made in a case where another image data item is superposed on a portion in which the base image is present. PA0 (3) The overall code length of synthesized novel image data can be changed by the image quality.
Therefore, it has been considered that the PDL cannot be used in the compression memory.
On the other hand, the page printer has a frame buffer for one page and a page description language interpreter (hereinafter called an "interpreter") develops, on the frame buffer, a code described in a page description language processed by an application program loaded in the host computer.
However, the fact that the frame buffer for one page is provided in the apparatus will cause the problem that the hardware is enlarged excessively (15 Mbit in a case of 400 dpi in an A4 sheet with 1 bit/pixel). This is a critical problem when color data is processed. For example, when a full color (24 bits/pixel) image, in which each of red, green and blue is imaged by 8 bits/pixel, is formed, an excessively large memory capacity of 24 times the above-described capacity is required.